<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Person {
            constructor(name, age) {
                this.name = name;
                this.age = age
            }

            // 这个值放到了Person的prototype上了
            loves = ["sport", "dance"]

            // 放到了Person构造函数上了
            static run() {
                console.log("run")
            }
        }

        var p1 = new Person("小刚", 20)
        console.log(p1.loves) // 是否和name age 一样？

        // 只能Person.run
        console.log(Person.run) // 没有

        // 
        var arr = [1, 2, 3, [4, 5, 4, 3, [1, 2]] ]
        var arr2 = [...new Set(arr.flat(Infinity))].sort((a, b)=> b-a)
        console.log(arr2)
    </script>
</body>
</html>